/*!
\copyright  Copyright (c) 2023 Qualcomm Technologies International, Ltd.\n
            All Rights Reserved.\n
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file       dfu_version_share_profile_l2cap.h
\defgroup   dfu_version_share_profile DFU Version Share Profile
\ingroup    dfu
\brief      Version Share Profile L2cap Channel creation for dfu version data sharing
*/

#ifndef DFU_VERSION_SHARE_PROFILE_L2CAP_H_
#define DFU_VERSION_SHARE_PROFILE_L2CAP_H_

#include <message_.h>
#include <bdaddr_.h>

/*! \brief Called within Version Share Profile when the application registers its task.

    \param client_task The task of the application/module using this profile.

    \return Success or failure as a boolean.
*/
bool DfuVersionShareProfileL2cap_ManagerRegister(Task client_task);

/*! \brief Called within Version Share Profile upon a connecting request to establish an L2CAP link.

    A VERSION_SHARE_PROFILE_CONNECTED message will be sent to the registered application
    task to inform about the outcome of this request.

    \param peer_addr Peripheral device Bluetooth address.

    \return Success or failure as a boolean.
*/
bool DfuVersionShareProfileL2cap_Connect(const bdaddr *peer_addr);

/*! \brief Called within Version Share Profile upon a disconnecting request to tear down the L2CAP link.

    A DFU_VERSION_SHARE_PROFILE_DISCONNECTED message will be sent to the registered application
    task to inform about the outcome of this request.

    \return Success or failure as a boolean.
*/
bool DfuVersionShareProfileL2cap_Disconnect(void);

#endif /* DFU_VERSION_SHARE_PROFILE_L2CAP_H_ */
